﻿@{
    Bundle("jquery_validate");
}

<script type="text/javascript">
    jQuery(document).ready(function () {
        jQuery('@ID("#form_pwd")').validate({
            rules: {
                password: {
                    required: true,
                    regex: '@Svc.Config(Par.In("Core").Of("AccountEntity").Name("PasswordPattern"))'
                },
                passwordConfirm: {
                    required: true,
                    equalTo: '@ID("#password")'
                }
            }
        });
    });
</script>
<form class="common-form" id="@ID("form_pwd")" action="@Url.Action(Loc.Act("Password").Localized())" method="post">
    <table>
        <tr>
            <td>
                <label>@T(Res.Name("Password"))</label>
            </td>
            <td>
                <input id="@ID("password")" type="password" name="password" />
            </td>
        </tr>
        <tr>
            <td>
                <label>@T(Res.Name("Confirm"))</label>
            </td>
            <td>
                <input type="password" name="passwordConfirm" />
            </td>
        </tr>
    </table>
    <ul class="bar toolbar">
        <li><input class="button" type="submit" value="@T(Res.In("Common").Of("Act").Name("Submit"))" /></li>
    </ul>
</form>
